-- GENERATED SPELL FOR [Qiraji Scarab] --


function spell0_15316(pUnit, Event) --@Acid Spit,n/a--
pUnit:FullCastSpellOnTarget(26050,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15316', 30000, 1)
end

function spell1_15316(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(6016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15316', 20000, 1)
end

function Sorts_15316(pUnit, Event)
local choix_sorts_15316 = math.random(0, 1)
if choix_sorts_15316 == 0 then
pUnit:RegisterEvent('spell0_15316', 1, 1)
end
if choix_sorts_15316 == 1 then
pUnit:RegisterEvent('spell1_15316', 1, 1)
end
end

function mob15316_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15316', math.random(1500, 3000), 1)
end

function mob15316_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15316_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15316_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15316, 1, 'mob15316_Action')
RegisterUnitEvent(15316, 2, 'mob15316_Leave')
RegisterUnitEvent(15316, 3, 'mob15316_Kill')
RegisterUnitEvent(15316, 4, 'mob15316_Die')
